<template>
	<view class="all">
		<view class="tabs">
			<view class="clicks" @click="change(1)">
				<text :class="inde==1?'checked':'check'">新报修</text>
				<view class="bot" v-if="inde==1"></view>
			</view>
			<view class="xian"></view>
			<view class="clicks" @click="change(2)">
				<text :class="inde==2?'checked':'check'">已处理报修</text>
				<view class="bot" v-if="inde==2"></view>
			</view>
		</view>
		<view class="new" v-if="inde==1">
			<view class="contents" v-for="(item,index) in 3" :key="index" @click="router('../undone/undone')">
				<view class="time">
					<text>2022年5月12日 10:24</text>
					<image src="../../static/images/right.png" mode=""></image>
				</view>
				<text>报修类目：水</text>
			</view>
		</view>
		<view class="new" v-if="inde==2">
			<view class="contents" v-for="(item,index) in 3" :key="index" @click="router('../finish/finish')">
				<view class="time">
					<text>2022年5月12日 10:24</text>
					<image src="../../static/images/right.png" mode=""></image>
				</view>
				<view class="finish">
					<text>报修类目：水</text>
					<view>已处理</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				inde: 1,
			}
		},
		onLoad() {

		},
		onShow() {},
		methods: {
			router(path) {
				uni.navigateTo({
					url: path
				})
			},
			change(index) {
				this.inde = index
			}
		}
	}
</script>

<style lang="scss">
	page {
		font-family: PingFang SC;
		background-color: #f7f7f7;

		.all {
			width: 750rpx;

			.tabs {
				margin-top: 1rpx;
				background-color: #fff;
				display: flex;
				justify-content: space-around;
				align-items: center;

				height: 88rpx;
				line-height: 88rpx;

				.clicks {
					width: 325rpx;
					display: flex;
					flex-direction: column;
					align-items: center;
					position: relative;

					.check {
						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #010101;
					}

					.checked {
						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #074D93;
					}

					.bot {
						position: absolute;
						bottom: 0;
						width: 40rpx;
						height: 4rpx;
						background: #074D93;
					}
				}

				.xian {
					height: 25rpx;
					width: 2rpx;
					background-color: #dedede;
				}
			}

			.new {
				.contents {
					background-color: #fff;
					padding: 30rpx 36rpx;
					font-size: 28rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #074D93;
					margin-bottom: 2rpx;
					.time {
						display: flex;
						justify-content: space-between;
						align-items: center;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #000000;
						padding-bottom: 27rpx;

						image {
							width: 8rpx;
							height: 14rpx;
						}
					}

					.finish {
						display: flex;
						justify-content: space-between;
						align-items: center;

						view {
							font-size: 28rpx;
							font-family: PingFang SC;
							font-weight: 400;
							color: #FF0000;
						}
					}
				}
			}
		}
	}
</style>
